package com.ruoyi.system.domain;

import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 项目采购对象 project_purchase
 * 
 * @author ruoyi
 * @date 2025-03-11
 */
@Data
public class ProjectPurchaseMaterial
{
    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "项目材料id")
    private Integer projectMaterialId;

    @ApiModelProperty(value = "项目申请id")
    private Integer projectPurchaseId;

    @ApiModelProperty(value = "项目采购订单id")
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private Integer projectPurchaseOrderId;

    @ApiModelProperty(value = "名称")
    private String name;

    @ApiModelProperty(value = "数量")
    private BigDecimal number;

    @ApiModelProperty(value = "单位")
    private String unit;

    @ApiModelProperty(value = "单价")
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private BigDecimal unitPrice;

    @ApiModelProperty("规格")
    private String specification;

    @ApiModelProperty(value = "总价")
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private BigDecimal price;

    @ApiModelProperty("状态0 待采购 1已采购 2已到货")
    private Integer status;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "创建时间")
    @TableField(exist = false)
    private Date createdTime;
}
